package com.fang.fen.test.remark;

public class Editor {
    private String operator;
    private MousePoint mousePoint;
    private String state;

    public Memeto createMemeto() {
        return new Memeto(operator, mousePoint, state);
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public MousePoint getMousePoint() {
        return mousePoint;
    }

    public void setMousePoint(MousePoint mousePoint) {
        this.mousePoint = mousePoint;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public void restore(Memeto memeto) {
        this.operator = memeto.getOperator();
        this.mousePoint = memeto.getMousePoint();
        this.state = memeto.getState();
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Editor{");
        sb.append("operator='").append(operator).append('\'');
        sb.append(", mousePoint=").append(mousePoint);
        sb.append(", state='").append(state).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
